Permission to use, copy, modify and distribute this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of ETH not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. ETH makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
ETH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ETH BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This is a quick overview of the Oberon system. For further questions please refer to the user manual:
Reiser M.: The Oberon System - User Guide and Programmer's Manual.
Addison-Wesley, 1991, ISBN 0-201-54422-9
Commands
Instead of calling programs, an Oberon user executes commands. A command is simply a parameterless procedure exported from a module. It is written as Modulename.Procedurename (e.g. Edit.Open). A command can be invoked by clicking at it with the middle mouse button wherever it occurs on the screen. When a command is not already on the screen, it can be entered from the keyboard into any text viewer. Users normally collect frequently used commands in a text file to avoid having to re-enter them again and again.
Examples for commands are Edit.Open which opens a text file for editing or System.Directory which displays some specified files of the directory.
This document can be printed by executing the command:
Edit.Print QuickDraw Welcome.Text ~
The Mouse
Oberon assumes a three button mouse where the buttons have the following meaning:
On systems with a one or two button mouse the keyboard can be used to simulate the missing buttons:
If you use PowerMac Oberon frequently, you might want to get a three_button mouse, of which there are now several models available for the Macintosh (we use the Logitech MouseMan for the Macintosh). Just configure it so that the left button generates a mouse click, the middle button emulates the "control" key on the keyboard and the right button the "option" button, and you will have a true Oberon mouse.
Note: There is also an Oberon version for a one button mouse. The single mouse button can be used there to set the caret, select text and scroll. The middle mouse button is only used to execute commands and to handle popup menus (see below). This version also provides scrollbars as on the Macintosh or under Windows. In order to use the one button version, simply rename the file TextFrames1.Obj to TextFrames.Obj.
Mouse Buttons and Special Keys
Point Button = ML
Sets the Caret: point to the desired character position with the mouse and click ML.
Execute Button = MM
Executes a command M.P: point to the command with the mouse and click MM.
Select Button= MR
Selects a contiguous stretch of text: move the mouse from the first character to the last character of the desired selection while holding down the MR button (this is called "dragging" the mouse).
For selecting large portions of text that don't fit into a viewer, split the viewer by executing the command System.Copy, select the beginning of the text stretch in the upper viewer and the end of the text stretch in the lower viewer.
Cancel
To cancel a mouse command that is just being initiated press all three mouse buttons simultaneously.
Mark Key = F1 key for PCs and PowerMacs, Enter key for Macs
Set the star-shaped marker: move the mouse to the desired location and press the Mark key.
Neutralize Key = ESC key
Remove all marks and selections on the screen by pressing the Neutralize key.
Viewers
The Oberon screen is divided into a user track (for displaying and editing documents) and a system track (for system messages and command input). Each track may contain several viewers (windows). Viewers consist of a title bar showing menu commands or popup menus (see below) and a contents area where text or graphics is displayed.
If you work on a small screen (15" or less) you may prefer having just one track instead of two so that the viewers become larger. Execute the command Screen.OneTrack to get to the following layout:
You can get back to the previous layout by executing Screen.TwoTracks.
The title bar of a viewer always contains the name of the viewer (i.e. the name of the document shown in the viewer) and a list of commands and popup menus (see below).
Resizing a Viewer = ML
Extend or reduce a viewer by clicking ML in its title bar and dragging the viewer top to a new location.
Moving a Viewer = ML followed by MM
Move a viewer to another track by interclicking MR during the Resize operation.
Text Editing
Edit.Open <filename>
Opens a new viewer and displays the contents of a file. If the file does not exist, an empty viewer will be opened.
Edit.Store
When activated from a menu, it stores the contents of the viewer into a text file with the same name as the viewer name. A file may be saved under a different name simply by editing the viewer name in the menu and executing Edit.Store.
CAUTION: CLOSING A VIEWER WITH System.Close WILL NOT SAVE THE TEXT IN THE VIEWER.
Text can be inserted from the keyboard at the position of the caret (the hook that marks the insert position). The caret can be set with the ML button. Text can be deleted with the backspace key or the del key. For copying and deleting larger portions of text the following commands can be used:
Clipboard.Cut (command-X on a Mac, F5 on a PC)
Deletes the selected text and after having copied it to the clipboard
Clipboard.Copy (command-C on a Mac, F6 on a PC)
Copies the selected text to the clipboard
Clipboard.Paste (command-V on a Mac, F7 on a PC)
Inserts the clipboard contents at the Caret position
For advanced users there are short-cuts invoked by interclicking a mouse button while another button is still pressed. These shortcuts can significantly speed up editing.
Copy to Caret = MR followed by MM
The selected text is copied to the caret position.
Copy from Selection = ML followed by MM
The most recent selection is copied to the new caret position.
Delete = MR followed by ML
The selected text is deleted.
The cursor keys can be used to move the caret to the left, to the right, one line up, and one line down.
Scrolling
In the Oberon System, scrolling is rather different from what you might be used to in other systems. Although it is unfamiliar in the beginning it offers faster and more exact scrolling to experienced users.
Move the mouse into the scroll bar to the left of the text and press one of the mouse buttons to execute one of the following actions
Scroll Forward = ML
The line to which the mouse points will be moved to the top
of the viewer.
Scroll Backward = MR
The line to which the mouse points will be moved to the
bottom of the viewer.
Absolute Positioning = MM
Scroll to a part of the document that corresponds to the
relative position of the mouse in the scroll bar.
Scroll Forward to Top = MM followed by MR
(interclick MR during Absolute Positioning)
Scroll to the beginning of the document.
Scroll Backward to Bottom = MM followed by ML
(interclick the ML during Absolute Positioning)
Scroll to the end of the document.
Advanced Commands
Copy attributes at the caret to the selection = ML followed by MR
The font and style at the caret position is applied to the selection.
Select to beginning of line
Click MR twice at the same character. You may keep dragging from the second click in order to select multiple lines.
Unload module prior to command execution = MM followed by ML
The command's module will be re-loaded from disk before the command is executed.
Open new edit viewer = MM followed by MR
A new viewer is opened with the file with name clicked on.
Command Arguments
There are several methods to specify the arguments of commands. We show them for Compiler.Compile as an example.
Compiler.Compile P1.Mod P2.Mod ... ~
The arguments follow immediately after the command and are terminated with a "~" (a tilde). Here the command compiles the files P1.Mod, P2.Mod, etc.
Compiler.Compile ^
The arguments are taken from the most recent text selection.
Compiler.Compile *
The argument is the contents of the marked viewer (the viewer that contains the star-shaped marker, set with the Mark key)
Using commands with the "^" suffix is especially convenient. To open a text file just select its name and click "Edit.Open ^". To inspect a module interface just select the module name and click "Browser.ShowDef ^". It is sufficient to select the first character of the argument.
Popup Menus
The system tool contains a number of grey buttons like the following one:
These are popup menus. Click at them with the MM button and select a command by dragging the mouse. Try it now.
You can edit the menu texts by clicking MM followed by MR at the popup menu. A text viewer will be opened in which you can add more commands or delete commands with the text editor. Execute the command PopupElems.Update from the menu bar of this viewer to make the modifications visible in the popup menu.
A new popup menu may be inserted at the caret position with the command PopupElems.Insert "<menu name>".
The menu bar of viewers also may contain popup menus like the following:
A popup menu like this may be inserted at the caret position with the command PopupElems.InsertMenu "<menu name>".
You can configure the menu bars of your system by editing the contents of the following text files according to your needs.
Edit.Menu.Text
Text to be shown in menu bars of viewers opened with Edit.Open
System.Menu.Text
Text to be shown in menu bars of viewers opened with System.Open
Log.Menu.Text
Text to be shown in the menu bar of the Log Viewer
Extensibility
The main feature of Oberon is extensibility. A user can add an arbitrary number of commands to the system at any time simply by writing a module and compiling it. There is no need to install the command (it may be activated as soon as compilation is completed) and modules containing commands are not added to the system until an actual call is made. Commands which are frequently used together are often collected in a text document. By displaying this document in a window the whole set of commands is immediately at hand. Such text documents are called Tools in Oberon (e.g., Edit.Tool). They play the role of editable menus.
Even the basic resources of the system are extensible. For example, the editor you are just using supports "live" extensions of characters which are sent messages when editing operations occur. The moving objects that you see below are such "extensions" of characters. They float in the text just as characters, and may be cut, copied and pasted.
Documentation
A lot of online documentation is supplied in this distribution. Execute the commands below (by pressing and releasing the Execute Button over it) for viewing the following texts:
Basic documentation:
Edit.Open Oberon.Guide.Text General concepts of Oberon
Edit.Open Oberon2.Report.Text Oberon-2 language report
More documentation:
Edit.Open Debug.Text Debugger documentation
Edit.Open Dialogs.Text Configurable dialog boxes
Edit.Open Draw.Text A simple graphics editor
Edit.Open Kepler.Text An advanced graphics editor
Edit.Open Elem.Guide.Text Elements floating in texts
Edit.Open Edit.Programming.Text How to program text elements
Edit.Open Toolbox.Interface.Text How to acces the Mac toolbox
A couple of books have been written on the design, use and implementation of Oberon:
N. Wirth and M. Reiser:
Programming in Oberon.Steps beyond Pascal and Modula_2.
Addison Wesley, 1992, ISBN 0-201-56543-9.
Tutorial for the Oberon programming language and concise language
reference.
M. Reiser: The Oberon System. User Guide and Programmer's Manual.
Addison Wesley, 1991, ISBN 0-201-54422-9.
User manual for the programming environment and reference for the
standard module library.
N. Wirth and J. Gutknecht:
Project Oberon. The Design of an Operating System and Compiler.
Addison Wesley, 1992, ISBN 0-201-54428-8.
Program listings with explanations for the whole Oberon system,
including the compiler for NS32000.
H. M
ssenb
ck: Object-Oriented Programming in Oberon-2.
Springer-Verlag, 1993, ISBN 3-540-56411-X.
(German: Objektorientierte Programmierung in Oberon-2,
Springer-Verlag, 1993, ISBN 3-540-55690-7)
Foundations and applications of OOP with a realistic case study in source code.
Portability
Oberon is also available for IBM PC (MS-Windows and Windows NT), Apple Macintosh (68020 and PowerMac), Sun SPARCStation, DECStation, IBM RS6000, Silicon Graphics, Amiga, and HP workstations. The Oberon libraries on those machines as well as the document architectures in all implementations are identical. For example, you could open this document on any of the machines mentioned above and see the same moving icon and clocks, despite even the fact that not all of the machines use the same byte ordering.
Availability
The Oberon system for the various platforms can be obtained via anonymous ftp from ftp.inf.ethz.ch (/pub/Oberon) or from oberon.ssw.uni-linz.ac.at (/pub/Oberon).